Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constify most non-trait Duration methods as described in #72440 #72481

Merged
merged 1 commit into from
Jul 16, 2020

Conversation

marmeladema
Copy link
Contributor

The remaining methods could probably be made const once #72449 lands with support for f<32|64>::is_finite().

@rust-highfive
Copy link
Collaborator

r? @sfackler

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 22, 2020
@marmeladema
Copy link
Contributor Author

cc @RalfJung @ecstatic-morse

src/libcore/time.rs Outdated Show resolved Hide resolved
@RalfJung
Copy link
Member

Cc @rust-lang/wg-const-eval

@oli-obk
Copy link
Contributor

oli-obk commented May 25, 2020

Marking as const-hack so we remember to go back to the original code once the relevant functions become const fn

@oli-obk
Copy link
Contributor

oli-obk commented May 25, 2020

r=me with Ralf's comment resolved to either match or if let for both destructurings

@marmeladema
Copy link
Contributor Author

@RalfJung @oli-obk
Should i wait for #72449 to land and update this PR to constify the remaining methods? Or would it be acceptable to re-use the same feature gate duration_consts_2 in a follow-up PR?

@RalfJung
Copy link
Member

Expanding the methods covered by the gate in a follow-up PR is fine.

@Elinvynia Elinvynia added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 10, 2020
@Elinvynia Elinvynia added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 25, 2020
@JohnTitor
Copy link
Member

r? @oli-obk - re-asigning reviewer following the conversations.

@rust-highfive rust-highfive assigned oli-obk and unassigned sfackler Jul 14, 2020
@oli-obk
Copy link
Contributor

oli-obk commented Jul 14, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Jul 14, 2020

📌 Commit 7527409 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 14, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jul 14, 2020
…i-obk

Constify most non-trait `Duration` methods as described in rust-lang#72440

The remaining methods could probably be made const once rust-lang#72449 lands with support for `f<32|64>::is_finite()`.
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 14, 2020
…i-obk

Constify most non-trait `Duration` methods as described in rust-lang#72440

The remaining methods could probably be made const once rust-lang#72449 lands with support for `f<32|64>::is_finite()`.
@Manishearth
Copy link
Member

@bors r-

#74329 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 14, 2020
@marmeladema
Copy link
Contributor Author

r? @oli-obk

@lcnr lcnr added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 15, 2020
@oli-obk
Copy link
Contributor

oli-obk commented Jul 16, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Jul 16, 2020

📌 Commit 4a96800 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 16, 2020
@bors
Copy link
Contributor

bors commented Jul 16, 2020

⌛ Testing commit 4a96800 with merge 6ee1b62...

@bors
Copy link
Contributor

bors commented Jul 16, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: oli-obk
Pushing 6ee1b62 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 16, 2020
@bors bors merged commit 6ee1b62 into rust-lang:master Jul 16, 2020
@marmeladema marmeladema deleted the duration-consts-2 branch April 24, 2021 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants